package org.dzl.springboot001.config;

import lombok.Data;

/**
 * @author 光的代言人
 */
@Data
public class JSONResult<T> {
    private Integer code=0;
    private String msg="";
    private T data;

    public JSONResult(){
        this.msg="success";
        this.code=0;
    }
    public JSONResult(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public JSONResult(String msg, T data) {

        this.msg = msg;
        this.data = data;
    }
    public JSONResult( T data) {

        this.data = data;
    }


    public JSONResult(String msg,Integer code,  T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
}
